package com.touchX.utils
{
	import flash.display.LoaderInfo;
	import flash.system.ApplicationDomain;
	
	public class ClassUtil
	{
		static public function getClass(className:String, loaderInfo:LoaderInfo = null):Class{
			try{
				if (loaderInfo== null){
					return ApplicationDomain.currentDomain.getDefinition(className) as Class;
				}
				return loaderInfo.applicationDomain.getDefinition(className) as Class;
			} catch (e:ReferenceError){
				trace("定义 " + className + " 不存在");
				return null;
			}
			return null;
		}
		
		
		public function ClassUtil()
		{
		}
	}
}